//
// Grid (MP)
//

#include "stagesetup.h"

extern s32 intro[];
extern u32 props[];
extern struct path paths[];
extern struct ailist ailists[];

struct stagesetup setup = {
	NULL,
	NULL,
	NULL,
	intro,
	props,
	paths,
	ailists,
	NULL,
};

u32 props[] = {
	weapon(0x0100, 0x0000, PAD_MP15_00AC, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION00)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00B7, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00B8, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00AD, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION01)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00B9, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BA, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00AE, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION02)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BB, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BC, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00AF, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION03)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BD, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BE, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B0, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION04)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00BF, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C0, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B1, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION05)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C1, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C2, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B3, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION06)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C5, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C6, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B4, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION07)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C7, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C8, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B5, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION08)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00C9, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00CA, OBJFLAG_FALL, 0, 0, 1000)
	weapon(0x0100, 0x0000, PAD_MP15_00B6, OBJFLAG_FALL, 0, 0, WEAPON_MPLOCATION09)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00CB, OBJFLAG_FALL, 0, 0, 1000)
	ammocratemulti(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_MP15_00CC, OBJFLAG_FALL, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D0, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D1, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D2, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D3, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D4, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D5, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D6, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D7, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D8, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_WINDOW, PAD_MP15_00D9, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0000, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0001, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0002, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0003, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0004, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0005, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0006, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0007, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_GLASS_FLOOR, PAD_MP15_0008, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_AISEETHROUGH, 0, 0, 1000)

#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0080, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000020, 0x00000258, 0x00000000, 0x00000001, 0x00000000)
#else
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0080, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000258, 0x00000000, 0x00000001, 0x00000300)
#endif

	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0081, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000020, 0x00000258, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0082, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000258, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0083, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000258, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0084, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000258, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_0085, 0, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000258, 0x00000000, 0x00000000, 0x00000300)
	tag(0x01, 1)
	lift(0x0100, MODEL_MATRIX_LIFT, PAD_MP15_00CE, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x00ce, 0x00cf, -1, -1, 0x00000001, 0x00000003, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x16000000)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_007C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001200)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_007D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_007E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001200)
	door(0x0100, MODEL_DOOR2A_G5, PAD_MP15_007F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-4, -5, 0)
	lift_door(-4, -6, 0)
	lift_door(-4, -7, 1)
	lift_door(-4, -8, 1)
	endprops
};

s32 intro[] = {
	spawn(PAD_MP15_00A2)
	spawn(PAD_MP15_00A3)
	spawn(PAD_MP15_00A4)
	spawn(PAD_MP15_00A5)
	spawn(PAD_MP15_00A6)
	spawn(PAD_MP15_00A7)
	spawn(PAD_MP15_00A8)
	spawn(PAD_MP15_00A9)
	spawn(PAD_MP15_00AA)
	spawn(PAD_MP15_00AB)
	case(0, PAD_MP15_0086)
	case_respawn(0, PAD_MP15_0087)
	case_respawn(0, PAD_MP15_0088)
	case_respawn(0, PAD_MP15_0089)
	case_respawn(0, PAD_MP15_008A)
	case_respawn(0, PAD_MP15_008B)
	case_respawn(0, PAD_MP15_008C)
	case(1, PAD_MP15_0093)
	case_respawn(1, PAD_MP15_008D)
	case_respawn(1, PAD_MP15_008E)
	case_respawn(1, PAD_MP15_008F)
	case_respawn(1, PAD_MP15_0090)
	case_respawn(1, PAD_MP15_0091)
	case_respawn(1, PAD_MP15_0092)
	case(2, PAD_MP15_009A)
	case_respawn(2, PAD_MP15_0094)
	case_respawn(2, PAD_MP15_0095)
	case_respawn(2, PAD_MP15_0096)
	case_respawn(2, PAD_MP15_0097)
	case_respawn(2, PAD_MP15_0098)
	case_respawn(2, PAD_MP15_0099)
	case(3, PAD_MP15_00A1)
	case_respawn(3, PAD_MP15_009B)
	case_respawn(3, PAD_MP15_009C)
	case_respawn(3, PAD_MP15_009D)
	case_respawn(3, PAD_MP15_009E)
	case_respawn(3, PAD_MP15_009F)
	case_respawn(3, PAD_MP15_00A0)
	hill(PAD_MP15_0073)
	hill(PAD_MP15_0013)
	hill(PAD_MP15_006B)
	hill(PAD_MP15_0060)
	endintro
};

struct path paths[] = {
	{ NULL, 0, 0 },
};

u8 func1001_start_lift[] = {
	activate_lift(1, 0x01)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1000_2400[] = {
	mp_init_simulants
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

struct ailist ailists[] = {
	{ func1000_2400,       0x1000 },
	{ func1001_start_lift, 0x1001 },
	{ NULL, 0 },
};
